package com.itheima.controller;

import com.itheima.domain.po.Emp;
import com.itheima.domain.query.EmpQueryParam;
import com.itheima.domain.vo.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@Slf4j
@RestController
@RequestMapping("/emps")
public class EmpController {
    
    @GetMapping
    public Result page(EmpQueryParam param) {
        log.info("员工列表查询条件：{}",param);
        return Result.success();
    }
    
    @PostMapping
    public Result save(@RequestBody Emp emp) {
        log.info("新增员工，员工信息：{}",emp);
        return Result.success();
    }
    
    @DeleteMapping
    public Result delete(@RequestParam List<Integer> ids) {
        log.info("批量删除学生，{}",ids);
        return Result.success();
    }
    
    @GetMapping("/{id}")
    public Result getById(@PathVariable Integer id) {
        log.info("根据ID查询员工信息，id：{}",id);
        return Result.success();
    }
    
    @PutMapping
    public Result update(@RequestBody Emp emp) {
        log.info("修改员工信息，员工信息：{}",emp);
        return Result.success();
    }
}
